package com.chaoyi.service.Impl;

import com.chaoyi.dao.mysql.ClassificationMapper;
import com.chaoyi.model.Classification;
import com.chaoyi.service.ClassificationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Auther: 卜加超
 * @Date: 2018/12/25 15:09
 * @Description:
 */
@Service
public class ClassificationServiceImpl implements ClassificationService {
    @Resource
    private ClassificationMapper classificationMapper;
    @Override
    public int findCount(Classification classification) {
        return classificationMapper.findCount(classification);
    }

    @Override
    public List<Classification> findList(int offset, int limit, Classification classification) {
        return classificationMapper.findList(offset,limit,classification);
    }

    @Override
    public int addClassificationSave(Classification entity) {
        return classificationMapper.save(entity);
    }

    @Override
    public int deleteClassification(int id) {
        return classificationMapper.deleteClassification(id);
    }

    @Override
    public Classification findClassificationOne(int id) {
        return classificationMapper.findClassificationOne(id);
    }

    @Override
    public int edit(Classification entity) {

        return classificationMapper.edit(entity);
    }

    @Override
    public List<Map<String, Object>> getClassificationList(Classification entity) {
        return classificationMapper.getClassificationList(entity);
    }

    @Override
    public List<Classification> selectClassficationList() {
        return classificationMapper.selectClassficationList();
    }
}
